package com.aop.SpElAop.ExpressionParser;

import lombok.AllArgsConstructor;
import lombok.Getter;

import java.lang.reflect.Method;

/**
 * @Package: com.aop.SpElAop
 * @ClassName: ExpressionRootObject
 * @Author: wulongkai
 * @CreateTime: 2024/7/9 11:59
 * @Description:
 */
@Getter
@AllArgsConstructor
public class ExpressionRootObject {

    private final Method method;

    private final Object[] args;

    private final Object target;

    private final Class<?> targetClass;

    /**
     * 使用#{#root.methodName}时调用
     */
    public String getMethodName() {
        return this.method.getName();
    }
}
